package com.czy.workflow.core.service;

import com.czy.workflow.core.model.*;

import java.util.List;

public interface FlowService {

    boolean saveFlowMain(FlowMain flowMain);

    FlowMain getFlowMainById(String flowId);

    FlowNode getFlowNodeById(String flowId, String nodeId);

    List<FlowNode> getNextNodes(String flowId, String nodeId);

    List<FlowBranch> getNodeBranches(String flowId, String nodeId);

    List<FlowNode> getStartNodes(String flowId);

    boolean refreshCurrentNodes(String flowId, String taskId, List<FlowNode> nodes);

    boolean clearCurrentNodes(String flowId, String taskId);

    List<FlowNode> getCurrentNodes(String flowId, String taskId);


    boolean saveFlowLog(TaskInfo taskInfo, boolean result);
}
